home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_e_h / fc_20k.zip / WWWFC3.MN_ < prev    next >
Text File  |  1992-11-10  |  6KB  |  202 lines

  1. ; Da AutoExec Section is on top here.  Actually runs before File Manager
  2. ; actually appears on the screen
  3. ; These variables should already be defined by the first menu file,
  4. ; but just to make sure...
  5.  
  6.         TAB=num2char(9)
  7.         CR=strcat(num2char(13),num2char(10))
  8.  
  9. Edit &INI files
  10.         call("wwwmenus.dll","INIEDIT")
  11.  
  12. &Wallpaper
  13.        call("wwwmenus.dll","WALLPAPER")
  14.  
  15. Sound Tricks
  16.  Play WAV file
  17.         a=CurrentFile()
  18.         if FileExtension(a)=="WAV" then goto play
  19.         a=FileItemize("*.wav")
  20.         if a!="" then goto sel
  21.         dirchange(DirWindows(0))        ; Where ever you hide your main wav files
  22.         a=fileitemize("*.wav")
  23.         :sel
  24.         a=itemselect("Waveform",a," ")
  25.         if a=="" then exit
  26.         :play
  27.         playwaveform(a,1)
  28.  
  29.  Play whole dir of wav files
  30.         old=Sounds(0)
  31.         a=FileItemize("*.WAV")
  32.         if a=="" then goto oop
  33.         count=itemcount(a,' ')
  34.         index=0
  35.         :loop
  36.         index=index+1
  37.         if index>count then goto zoop
  38.         b=itemextract(index,a,' ')
  39.         playwaveform(b,1)
  40.         display(3,index,b)
  41.         goto loop
  42.         :oop
  43.         message("???","No wav files in directory")
  44.         :zoop
  45.         sounds(old)
  46.  
  47.  Play MID or RMI file
  48.         a=CurrentFile()
  49.         if (FileExtension(a)=="MID" || FileExtension(a)=="RMI") then goto play
  50.         a=FileItemize("*.mid *.rmi")
  51.         if a!="" then goto sel
  52.         dirchange(DirWindows(0))        ; Where ever you hide your main mid/rmi files
  53.         a=fileitemize("*.mid")
  54.         :sel
  55.         a=itemselect("MIDI Player",a," ")
  56.         if a=="" then exit
  57.         :play
  58.         a=strcat(DirGet(),a)
  59.         playmidi(a,1)
  60.  
  61.  Play a CD
  62.         PlayMedia("open cdaudio shareable alias donna notify")
  63.         PlayMedia("set donna time format tmsf")
  64.         PlayMedia("play donna from 1")
  65.         PlayMedia("close donna")
  66.  
  67. _ZIP...
  68.  Zip Current File
  69.   Keep Current File
  70.         call("wwwmenus.dll","zip current keep")
  71.   Move File to Zip
  72.         call("wwwmenus.dll","zip current move")
  73.  
  74.  Zip Directory
  75.   Keep Files
  76.         call("wwwmenus.dll","zip dir keep")
  77.   Move Files to Zip
  78.         call("wwwmenus.dll","zip dir move")
  79.  
  80.  Zip Directory and Subdirs
  81.   Keep Files
  82.         call("wwwmenus.dll","zip subdir keep")
  83.   Move Files to Zip
  84.         call("wwwmenus.dll","zip subdir move")
  85.  
  86.  Zip Hilited Files
  87.   Keep Files
  88.         call("wwwmenus.dll","zip hilited keep")
  89.   Move Files to Zip
  90.         call("wwwmenus.dll","zip hilited move")
  91.  
  92.  
  93.  _UnZip
  94.   All files
  95.    Into Current Dir
  96.         call("wwwmenus.dll","unzip all 1")
  97.    Specify Options
  98.         call("wwwmenus.dll","unzip all 2")
  99.   Individual
  100.    Into Cur Dir/Overwrite
  101.         call("wwwmenus.dll","unzip indiv 1")
  102.    Specify Options
  103.         call("wwwmenus.dll","unzip indiv 2")
  104.  
  105.  _&View contents
  106.   By &Name
  107.         call("wwwmenus.dll","unzip view 1")
  108.   By &Extension
  109.         call("wwwmenus.dll","unzip view 2")
  110.   By &Date
  111.         call("wwwmenus.dll","unzip view 3")
  112.   By &Size
  113.         call("wwwmenus.dll","unzip view 4")
  114.  
  115.  
  116.  
  117. |Interactive WIL
  118.  Execute WIL Function
  119.         Call("wwwmenus.dll","CMDSTACK NEWCMD")
  120.  Execute a Previous Entry
  121.         Call("wwwmenus.dll","CMDSTACK PREVIOUS")
  122.  _Flush Previous Entries
  123.         Call("wwwmenus.dll","CMDSTACK FLUSH")
  124.  
  125.  
  126. Excel DDE Example
  127. ;This code makes a multiplication table in Excel via DDE
  128.                                                          ; Find Excel
  129.          a=FileLocate("excel.exe")                       ; Try brute force path search
  130.          if a=="" then a=IniRead("extensions","xls","")  ; No? Try via [extensions] section
  131.          terminate(a=="","Error","Excel not found")      ; Not installed normally
  132.          b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  133.          if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  134.          b=strsub(a,1,b-1)                               ; Pick off ^.xls stuff
  135.          run(b,"")                                       ; Run Excel
  136.  
  137.          channel = DDEInitiate("Excel", "Sheet1")
  138.  
  139.          Numbers="One Two Three Four Five Six Seven Eight Nine Ten"
  140.  
  141.          offset=1
  142.          row=0
  143.  
  144.          :rowloop
  145.          col=0
  146.          row=row+1
  147.          if row > 10 then goto byebye
  148.  
  149.          ThisNum=ItemExtract(row,Numbers," ")
  150.          title=row+offset
  151.          DDEPoke(channel, "R1C%title%", ThisNum)
  152.          DDEPoke(channel, "R%title%C1", ThisNUm)
  153.  
  154.          :colloop
  155.          col=col+1
  156.          if col > 10 then goto rowloop
  157.  
  158.          expression="=%row%*%col%"
  159.          address=strcat("R",row+offset,"C",col+offset)
  160.          DDEPoke(channel,address,expression)
  161.          goto colloop
  162.  
  163.          :byebye
  164.          DDETerminate(channel)
  165.  
  166.  
  167. Days between today and ???
  168.         ;First convert todays date to Julian Equivalent
  169.          
  170.         ; extracts separate M, D, and Y variables from DateTime string
  171.         ; assumes international date format is standard U.S. (MM/DD/YY)
  172.  
  173.         dt1 = strtrim(DateTime())
  174.         dt = ItemExtract(3,dt1," ")
  175.         if dt=="" then dt=ItemExtract(2,dt1," ")
  176.         dm = ItemExtract(1,dt,"/")
  177.         dd = ItemExtract(2,dt,"/")
  178.         dy = ItemExtract(3,dt,"/")
  179.  
  180.         ; performs the actual conversion
  181.         dm = dm + 9
  182.         dy = dy + dm / 12 + 399
  183.         dm = dm mod 12
  184.         today = dy * 365 + dy / 4 - dy / 100 + dy / 400 + (153 * dm + 2) / 5 + dd - 146037
  185.         xt=strtrim(AskLine("Day Counter","Enter target date",dt))
  186.  
  187.         xm = ItemExtract(1,xt,"/")
  188.         xd = ItemExtract(2,xt,"/")
  189.         xy = ItemExtract(3,xt,"/")
  190.  
  191.         ; performs the actual conversion
  192.         xm = xm + 9
  193.         xy = xy + xm / 12 + 399
  194.         xm = xm mod 12
  195.         other = xy * 365 + xy / 4 - xy / 100 + xy / 400 + (153 * xm + 2) / 5 + xd - 146037
  196.         diff=abs(today-other);
  197.         Message("Day Counter","%dt% <=> %xt%%CR%Are %diff% days apart")
  198.         drop(dt,dm,dd,dy,xm,xd,xy,xt,today,other,diff,dt1)
  199.  
  200. _Phone Book
  201.         call("wwwmenus.dll","FONEBOOK")
  202.